package values;

import java.sql.Date;
import java.sql.Time;
import java.util.ArrayList;



/**
 * Represents a comment.
 */
public class Comment 
{
	// Attributes
	/**
	 * Comment's Id.
	 */
	private int id;
	
	/**
	 * Comment's content.
	 */
	private String content;
	
	/**
	 * Related bank.
	 */
	private int bankId;
	
	/**
	 * Date the comment was made.
	 */
	private Date date;
	
	/**
	 * Time the comment was made.
	 */
	private Time time;
	
	/**
	 * Comment's Topics.
	 */
	private ArrayList<String> topics;
	
	/**
	 * Related comments.
	 */
	private ArrayList<RelatedComment> comments;
	
	/**
	 * Comment's author.
	 */
	private String logIn;
	
	/**
	 * Comment's heading;
	 */
	private String heading;
	

	
	/**
	 * Comment's helpful counter. 
	 */
	private int helpful;
	
	/**
	 * Login of the user that has marked this comment as innapropiate.
	 */
	private String innappropiate;

	// Constructor
	
	/**
	 * Returns an instance of the class.
	 */
	public Comment(int id, String login,  String content, int bankId, Date date, Time time, ArrayList<String> topics, ArrayList<RelatedComment> comments,String heading, int helpful, String innappropiate) 
	{
		this.id = id;
		this.content = content;
		this.bankId = bankId;
		this.date = date;
		this.time = time;
		this.topics = topics;
		this.comments = comments;
		this.logIn = login;
		this.heading=heading;

		this.helpful=helpful;
		this.innappropiate=innappropiate;
	}

	// Methods
	
	/**
	 * @return the heading
	 */
	public String getHeading() {
		return heading;
	}

	/**
	 * @param heading the heading to set
	 */
	public void setHeading(String heading) {
		this.heading = heading;
	}


	/**
	 * @return the helpful
	 */
	public int getHelpful() {
		return helpful;
	}

	/**
	 * @param helpful the helpful to set
	 */
	public void setHelpful(int helpful) {
		this.helpful = helpful;
	}

	/**
	 * @return the innappropiate
	 */
	public String getInnappropiate() {
		return innappropiate;
	}

	/**
	 * @param innappropiate the innappropiate to set
	 */
	public void setInnappropiate(String innappropiate) {
		this.innappropiate = innappropiate;
	}

	/**
	 * Get the comment's id.
	 */
	public int getId() {
		return id;
	}

	/**
	 * Get the comment's content.
	 */
	public String getContent() {
		return content;
	}

	/**
	 * Get the related bank's id.
	 */
	public int getBankId() {
		return bankId;
	}

	/**
	 * Get the date the comment was made.
	 */
	public Date getDate() {
		return date;
	}

	/**
	 * Get the time during which the comment was made.
	 */
	public Time getTime() {
		return time;
	}

	/**
	 * Get the comment's topics.
	 */
	public ArrayList<String> getTopics() {
		return topics;
	}

	/**
	 * Get the comment's related comments.
	 */
	public ArrayList<RelatedComment> getComments() {
		return comments;
	}
	
	/**
	 * @return the logIn
	 */
	public String getLogIn() {
		return logIn;
	}

	/**
	 * @param logIn the logIn to set
	 */
	public void setLogIn(String logIn) {
		this.logIn = logIn;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @param content the content to set
	 */
	public void setContent(String content) {
		this.content = content;
	}

	/**
	 * @param bankId the bankId to set
	 */
	public void setBankId(int bankId) {
		this.bankId = bankId;
	}

	/**
	 * @param date the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}

	/**
	 * @param time the time to set
	 */
	public void setTime(Time time) {
		this.time = time;
	}

	/**
	 * @param topics the topics to set
	 */
	public void setTopics(ArrayList<String> topics) {
		this.topics = topics;
	}

	/**
	 * @param comments the comments to set
	 */
	public void setComments(ArrayList<RelatedComment> comments) {
		this.comments = comments;
	}

	/**
	 * Get the comment's author's login.
	 */
	public String getAuthor()
	{
		return logIn;
	}
}
